Public Class ScanScheduleDefault
    Inherits Base

    Private mlScanTypeID As Long
    Private mlScanTypeMinutes As Long

    Public Sub New()
        MyBase.New()

        Dim oNextID As New DBNextIDValue("ScanScheduleDefaults")
        Dim lNextID As Long = oNextID.NextValue

        Me.ID = lNextID
    End Sub

    Public Sub New( _
                ByVal lID As Long)

        MyBase.New(lID)
    End Sub

#Region "Properties"
    Public Property ScanTypeID() As ScanSchedule.Type
        Get
            Return mlScanTypeID
        End Get
        Set(ByVal value As ScanSchedule.Type)
            mlScanTypeID = value
        End Set
    End Property

    Public Property ScanTypeMinutes() As Long
        Get
            Return mlScanTypeMinutes
        End Get
        Set(ByVal value As Long)
            mlScanTypeMinutes = value
        End Set
    End Property
#End Region

#Region "database"
    Public Sub Load()
        Dim oObject As New DBScanScheduleDefault

        oObject.Load(Me)
    End Sub

    Public Sub Save()
        Dim oObject As New DBScanScheduleDefault

        If mbObjectExists = True Then
            oObject.Update(Me)
        Else
            Me.CreateDate = Now
            oObject.Add(Me)
            mbObjectExists = True
        End If
    End Sub

    Public Sub Delete()
        Dim oObject As New DBScanScheduleDefault

        oObject.Delete(Me)
        mbObjectExists = False
    End Sub
#End Region

End Class
